Fix warnings in switch statements on clang#3943
Fix warnings in switch statements on clang#3943danmar merged 4 commits intocppcheck-opensource:mainfrom
Conversation
* valueFlowUninit: Handle arrays and pod types * Format * Catch another array case
| add_compile_options(-Wextra) | ||
| add_compile_options(-Wcast-qual) # Cast for removing type qualifiers | ||
| add_compile_options(-Wfloat-equal) # Floating values used in equality comparisons | ||
| # add_compile_options(-Wfloat-equal) # Floating values used in equality comparisons |
There was a problem hiding this comment.
This is also enable in the Makefile by default. If we no longer care about it we should just remove it everywhere.
There was a problem hiding this comment.
In general I would agree with the warning but I believe there are some case in cppcheck code that we don't want to warn about.
| add_compile_options_safe(-Wno-implicitly-unsigned-literal) | ||
| add_compile_options_safe(-Wno-tautological-type-limit-compare) | ||
| add_compile_options_safe(-Wno-unused-member-function) | ||
| add_compile_options_safe(-Wno-deprecated-declarations) |
There was a problem hiding this comment.
This should not be disabled since it shows us deprecated Qt functions. We need to disable it for the readdir_r case only.
There was a problem hiding this comment.
can it be disabled for readdir_r only?
| add_compile_options_safe(-Wno-extra-semi-stmt) # TODO: enable when warnings are fixed in in tinyxml2 | ||
| add_compile_options_safe(-Wno-implicitly-unsigned-literal) | ||
| add_compile_options_safe(-Wno-tautological-type-limit-compare) | ||
| add_compile_options_safe(-Wno-unused-member-function) |
There was a problem hiding this comment.
This should be enabled and the unused function needs to get the unused/maybe_unused attribute.
|
Actually, I wasnt trying to fix all compiler warnings, I was disabling the outstanding ones so I can compile with |
No description provided.